Optimal. Leaf size=49 \[ \frac {d x}{c}-\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {1408, 788, 649,
211, 266} \begin {gather*} -\frac {\sqrt {a} d \text {ArcTan}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c}+\frac {d x}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 266
Rule 649
Rule 788
Rule 1408
Rubi steps
\begin {align*} \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}} \, dx &=\int \frac {x (e+d x)}{a+c x^2} \, dx\\ &=\frac {d x}{c}+\frac {\int \frac {-a d+c e x}{a+c x^2} \, dx}{c}\\ &=\frac {d x}{c}-\frac {(a d) \int \frac {1}{a+c x^2} \, dx}{c}+e \int \frac {x}{a+c x^2} \, dx\\ &=\frac {d x}{c}-\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 49, normalized size = 1.00 \begin {gather*} \frac {d x}{c}-\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 42, normalized size = 0.86
method | result | size |
default | \(\frac {d x}{c}+\frac {\frac {e \ln \left (c \,x^{2}+a \right )}{2}-\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{c}\) | \(42\) |
risch | \(\frac {d x}{c}+\frac {\ln \left (-\sqrt {-a c}\, x -a \right ) d \sqrt {-a c}}{2 c^{2}}+\frac {\ln \left (-\sqrt {-a c}\, x -a \right ) e}{2 c}-\frac {\ln \left (\sqrt {-a c}\, x -a \right ) d \sqrt {-a c}}{2 c^{2}}+\frac {\ln \left (\sqrt {-a c}\, x -a \right ) e}{2 c}\) | \(98\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 43, normalized size = 0.88 \begin {gather*} -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} + \frac {d x}{c} + \frac {e \log \left (c x^{2} + a\right )}{2 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 110, normalized size = 2.24 \begin {gather*} \left [\frac {d \sqrt {-\frac {a}{c}} \log \left (\frac {c x^{2} - 2 \, c x \sqrt {-\frac {a}{c}} - a}{c x^{2} + a}\right ) + 2 \, d x + e \log \left (c x^{2} + a\right )}{2 \, c}, -\frac {2 \, d \sqrt {\frac {a}{c}} \arctan \left (\frac {c x \sqrt {\frac {a}{c}}}{a}\right ) - 2 \, d x - e \log \left (c x^{2} + a\right )}{2 \, c}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 112 vs.
\(2 (42) = 84\).
time = 0.13, size = 112, normalized size = 2.29 \begin {gather*} \left (\frac {e}{2 c} - \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) \log {\left (x + \frac {- 2 c \left (\frac {e}{2 c} - \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) + e}{d} \right )} + \left (\frac {e}{2 c} + \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) \log {\left (x + \frac {- 2 c \left (\frac {e}{2 c} + \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) + e}{d} \right )} + \frac {d x}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.53, size = 43, normalized size = 0.88 \begin {gather*} -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} + \frac {d x}{c} + \frac {e \log \left (c x^{2} + a\right )}{2 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.59, size = 39, normalized size = 0.80 \begin {gather*} \frac {e\,\ln \left (c\,x^2+a\right )}{2\,c}+\frac {d\,x}{c}-\frac {\sqrt {a}\,d\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{c^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________